package day02;

public class HomeWork {
    public static void main(String[] args) {
        //练习1
        /*
        int a;
        int b,c;
        int d=1;
        int e;
        e=2;
        int g=10;
        int h = g+10;
        System.out.println(h);
        g = g+10;
        System.out.println(g);
        int $$,$1a,a$$;
        //int 1a;
        //int a*b;
        //int mingzi;
        //int 姓名;

         */
        //练习2
        /*
        int a=5,b=2;
        System.out.println(a/b);//2
        int c=1999999999,d=1000000000;
        System.out.println(c+d);//负数
        System.out.println(2/5);//0
        System.out.println(5/2.0);//2.5
         */
        //练习3
        /*
        long a = 10000000000L;
        long b = 10L;
        long c = 1000000000*3*200L;
        System.out.println(c);//溢出为负数
        long d = 1000000000L*3*200;
        System.out.println(d);//未溢出

         */

        //练习4
        /*
        double a=1.9,b=2.0;
        System.out.println(a+b);//无误差
        System.out.println(b-a);//舍入误差

         */
        //练习5
        /*
        boolean a = true;
        boolean b = false;
        //boolean c = 1;编译错误

         */
        //练习6
        /*
        char c1 = '你';
        char c2 = ' ';
        char c3 = '2';
        char c4 = 'a';
        char c5 = '!';
        //转义符
        char c6 = '\'';
        char c7 = '\\';

         */
        //练习7
        /*
        int a = 5;
        long b = a;//自动转换
        long c = 1000000000000L;
        int d = (int) c;
        System.out.println(d);//溢出
        double e = 10.105;
        int f = (int) e;
        System.out.println(f);//强转丢失精度

         */

        //练习8
        byte b1 = 1;
        byte b2 = 2;
        byte b3 = (byte)(b1+b2);
        System.out.println(b3);
    }
}
